<template>
	<view :style="{ 'background-image': `linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 100%),url(${store.mer_banner})` }"
	 class="store-home">
		<!-- 搜索 -->
		<!-- #ifdef MP || APP-PLUS -->
		<view :style="{ height: statusBarHeight }"></view>
		<view class="header">
			<view class="head-menu">
				<view class="iconfont icon-xiangzuo" @click="goback" style="color: #fff;"></view>
				<view class="iconfont icon-shouye4" @click="goHome" style="color: #fff;"></view>
			</view>
			<navigator :url="'/pages/store/list/index?mer_id='+id" hover-class="none" class="search"><text class="iconfont icon-xiazai5"></text>搜索商品</navigator>
		</view>
		<!-- #endif -->
		<!-- #ifdef H5 -->
		<view class="header" :class="{noPointer : preview}">
			<view class="head-menu">
				<view class="iconfont icon-xiangzuo" @click="goback"></view>
				<view class="iconfont icon-shouye4" @click="goHome"></view>
			</view>
			<navigator :url="'/pages/store/list/index?mer_id='+id" hover-class="none" class="search"><text class="iconfont icon-xiazai5"></text>搜索商品</navigator>
		</view>
		<!-- #endif -->
		<!-- <view v-show="navShow && tabActive === 3" class="nav" :style="viewColor">
			<view class="nav-cont" :class="{noPointer : preview}">
				<view :class="{ active: navActive === 0 }" class="item" @click="navActive = 0;select.show = !select.show">
					<view class="cont">
						{{ select.selected ? '评分' : '默认' }}
						<text :class="['arrow-icon', 'iconfont', select.show ? 'icon-xiangshang' : 'icon-xiangxia']"></text>
					</view>
				</view>
				<view :class="{ active: navActive === 1 }" class="item" @click="set_where(2,0)">
					<view class="cont">销量</view>
				</view>
				<view :class="{ active: navActive === 2 }" class="item" @click="set_where(3,0)">
					<view class="cont">
						价格
						<image :src="sortPrice ? domain+'/static/diy/up'+keyColor+'.png' : domain+'/static/diy/down'+keyColor+'.png'"></image>
					</view>
				</view>
				<view class="item" @click="select.show = false;navActive = 4;isColumn = !isColumn">
					<view class="cont">
						<text :class="['layout-icon', 'iconfont', isColumn ? 'icon-pailie' : 'icon-tupianpailie']"></text>
					</view>
				</view>
			</view>
			<view v-show="select.show && navShow" class="select">
				<view v-for="item in select.options" :key="item.id" :class="{ active: item.id === select.selected }" class="item"
				 @click="set_where(item.id,0)">
				 {{ item.name }}
				 <text v-if="item.id === select.selected" class="iconfont icon-gou"></text>
				 </view>
			</view>
		</view> -->
		<!--diy页面的导航-->
		<!-- <view v-show="navShow && tabActive == 1" class="nav" :style="viewColor">
			<view class="nav-cont" :class="{noPointer : preview}">
				<view :class="{ active: diyActive == 0 }" class="item" @click="setDiy">
					<view class="cont">精选</view>
				</view>
				<view :class="{ active: diyActive == 1 }" class="item" @click="set_where(4,1)">
					<view class="cont">新品</view>
				</view>
				<view :class="{ active: diyActive ===2 }" class="item" @click="set_where(5,2)">
					<view class="cont">活动</view>
				</view>
				<view :class="{ active: diyActive == 3 }" class="item" @click="getCoupon">
					<view class="cont">领券</view>
				</view>
			</view>
		</view> -->
		<view class="main" :style="viewColor"><!-- <scroll-view class="main" scroll-y="true" @scroll="scrollHome" catchtouchmove :style="viewColor"> -->
			<!-- 店铺信息 -->
			<view id="store" class="store" :class="{noPointer : preview}">
				<image :src="store.mer_avatar"></image>
				<view class="text">
					<navigator :url="`/pages/store/detail/index?id=${id}`" hover-class="none">
						<text v-if="store.type_name" class="font-bg-red">{{store.type_name}}</text>
						<text v-else-if="store.is_trader" class="font-bg-red">自营</text>
						<text class="name">{{ store.mer_name }}</text>
						<image v-if="margin_ico_switch==1 && margin_ico && store.is_margin == 10" :src="margin_ico" class="store-margin"></image>
						<text class="iconfont icon-xiangyou"></text>
					</navigator>
					<view class="score">
						<view class="star">
							<view
							:style="{width: `${score.star.toFixed(2)}%`, backgroundImage: `url(${domain}/static/diy/score1${keyColor}.png)`}"></view>
						</view>
						<view>{{ score.number.toFixed(1) }}</view>
					</view>
				</view>
				<view v-if="store.services_type == 0" class="kefu" @click="goService">
					<text class="iconfont icon-kefu3"></text>
				</view>
				<view v-else-if="store.services_type == 1" class="kefu" @click="call(1)">
					<text class="iconfont icon-kefu3"></text>
				</view>
				<view v-else class="kefu" @click="call(0)">
					<text class="iconfont icon-kefu3"></text>
				</view>
				<button hover-class="none" :class="store.care ? 'care' : ''" v-if="!isLogin" @click="authOpen">
					<text v-show="!store.care" class="iconfont icon-guanzhu"></text>
					{{ store.care ? '已关注' : '关注' }}
				</button>
				<button v-else hover-class="none" :class="store.care ? 'care' : ''" @click="followToggle">
					<text v-show="!store.care" class="iconfont icon-guanzhu"></text>
					{{ store.care ? '已关注' : '关注' }}
				</button>
			</view>
			
			<!-- <view v-show="!navShow && tabActive === 3" class="nav">
				<view class="nav-cont" :class="{noPointer : preview}">
					<view :class="{ active: navActive === 0 }" class="item" @click="navActive = 0;select.show = !select.show">
						<view class="cont">
							{{ select.selected ? '评分' : '默认' }}
							<text :class="['arrow-icon', 'iconfont', select.show ? 'icon-xiangshang' : 'icon-xiangxia']"></text>
						</view>
					</view>
					<view :class="{ active: navActive === 1 }" class="item" @click="set_where(2,0)">
						<view class="cont">
							销量
						</view>
					</view>
					<view :class="{ active: navActive === 2 }" class="item" @click="set_where(3,0)">
						<view class="cont">
							价格
							<image v-if="navActive === 2 && where.order == 'price_asc'" :src="domain+'/static/diy/up'+keyColor+'.png'"></image>
							<image v-if="navActive === 2 && where.order == 'price_desc'" :src="domain+'/static/diy/down'+keyColor+'.png'"></image>
						</view>
					</view>
					<view class="item" @click="select.show = false;navActive = 4;isColumn = !isColumn">
						<view class="cont">
							<text :class="['layout-icon', 'iconfont', isColumn ? 'icon-pailie' : 'icon-tupianpailie']"></text>
						</view>
					</view>
				</view>
				<view v-show="select.show && !navShow" class="select">
					<view v-for="item in select.options" :key="item.id" :class="{ active: item.id === select.selected }" class="item"
					 @click="set_where(item.id,0)">{{ item.name }}
					 <text v-if="item.id === select.selected" class="iconfont icon-gou"></text>
					 </view>
				</view>
			</view> -->
			<!--diy导航-->
			<!-- <view v-show="!navShow && tabActive === 1" class="nav">
				<view class="nav-cont" :class="{noPointer : preview}">
					<view :class="{ active: diyActive == 0 }" class="item" @click="setDiy">
						<view class="cont">精选</view>
					</view>
					<view :class="{ active: diyActive == 1 }" class="item" @click="set_where(4,1)">
						<view class="cont">新品</view>
					</view>
					<view :class="{ active: diyActive == 2 }" class="item" @click="set_where(5,2)">
						<view class="cont">活动</view>
					</view>
					<view :class="{ active: diyActive == 3 }" class="item" @click="getCoupon">
						<view class="cont">领券</view>
					</view>
				</view>
				<view v-show="select.show && !navShow" class="select">
					<view v-for="item in select.options" :key="item.id" :class="{ active: item.id === select.selected }" class="item"
					 @click="set_where(item.id)">{{ item.name }}
					 <text v-if="item.id === select.selected" class="iconfont icon-gou"></text>
					 </view>
				</view>
			</view> -->
			<view class="tab-cont" :style="viewColor" :class="{noPointer : preview}">
				<!-- 首页 -->
				<scroll-view v-if="tabActive == 1" class="subpage1" scroll-y="true" @scroll="scrollHome" catchtouchmove :style="viewColor"> <!-- <view v-show="tabActive == 1"> -->
				
					<!-- begin 轮播图 by cmh -->
					<view class="swiper" v-if="tabActive == 1 && slideImgs.length">
						<swiper indicator-dots="true" :autoplay="autoplay" :circular="circular" :interval="interval"
							:duration="duration" indicator-color="#E4E4E4" indicator-active-color="#E93323" previous-margin="40rpx"
							next-margin="40rpx" :current="swiperCur" @change="swiperChange">
							<block v-for="(item, index) in slideImgs" :key="index">
								<swiper-item :class="{ active: index == swiperCur }">
									<view @click="goUrl(item.url)" class="slide-navigator acea-row row-between-wrapper">
										<image :src="item.pic" class="slide-image"></image>
									</view>
								</swiper-item>
							</block>
						</swiper>
					</view>
					<!-- end 轮播图 by cmh -->
					
					<view v-if="goods.length" class="goods-wrap" id="goods" @touchmove="onTouchmove">
						<view v-if="isColumn && 1 != store.category_id" class="goods column">
							<view v-for="item in goods" :key="item.product_id" class="item" @click="goGoodsDetail(item)">
								<view class="image">
									<easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage>
									<view v-if="item.stock == 0" class="sell_out">已售罄</view>
									<view v-if="item.border_pic" :style="{ backgroundImage: `url(${item.border_pic})` }" class="border-picture"></view>
								</view>
								<view class="text on acea-row row-between-wrapper">
									<view class="name line2">
										<text class="name_text line1">{{ item.store_name }}</text>
									</view>
									<view class="item_bot">
										<view class="money-wrap acea-row">
											<view class="money">
												¥<text>{{ item.price }}</text>
											</view>
											<view v-if="item.show_svip_info && item.show_svip_info.show_svip_price && item.svip_price" class="acea-row row-middle">
												<text class='vip-money'>￥{{item.svip_price}}</text>
												<view class="vipImg">
													<image class="image" :src="`${domain}/static/images/svip.png`"></image>
												</view>
											</view>
										</view>
										<view v-if="item.product_type != 0 || item.issetCoupon || item.delivery_free == 1" class="item_tags">
											<text v-if="item.product_type != 0" :class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>
											<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
											<text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
										</view>
										<view class="score">{{ item.rate }}评分 {{ item.reply_count }}条评论</view>
									</view>
								</view>
								<view v-if="item.max_extension>0 && (item.product_type == 0 || item.product_type == 2)" class="foot">
									<text v-show="!isColumn" class="iconfont"></text>
									最高赚 ¥{{ item.max_extension }}
								</view>
							</view>
						</view>
						<view v-else class="goods">
							<WaterfallsFlow :wfList='goods' @itemTap="goGoodsDetail" :type="1" :isStore="1"/>
						</view>
					</view>
					<view v-if="goodsLoading" class="acea-row row-center-wrapper loadingicon">
						<text :hidden="!goodsLoading" class="iconfont icon-jiazai loading"></text>
						{{loadTitle}}
					</view>
					<emptyPage v-if="goods.length == 0 && !goodsLoading" title="暂无商品~"></emptyPage>
				</scroll-view>
				
				<!-- begin 小卖部 by cmh -->
				<view v-if="tabActive == 2 && 1 == store.category_id"  style="display: flex;">
					<!-- <view class="category">
						<view class="section">
							<view class="head" @click="goCategoryGoods('')">
								<view class="title">全部</view>
								<view class="iconfont icon-xiangyou"></view>
							</view>
						</view>
						<view v-for="item in category" :key="item.store_category_id" class="section">
							<view class="head" @click="goCategoryGoods(item.store_category_id)">
								<view class="title">{{ item.cate_name }}</view>
								<view class="iconfont icon-xiangyou"></view>
							</view>
							<view v-if="item.children" class="body">
								<view v-for="value in item.children" :key="value.store_category_id" class="item" @click="goCategoryGoods(value.store_category_id)">{{ value.cate_name }}</view>
							</view>
						</view>
					</view>
					<view class="acea-row row-center-wrapper loadingicon">
						<text :hidden="!categoryLoading" class="iconfont icon-jiazai loading"></text>
						{{loadTitle}}
					</view> -->
					
					<!-- 
						tabScrollPos:程序定位滚动位置 
						data-id: 可通过元素的dataset.id获取该值（vue中，dataset是一个特殊的数据对象，它包含了元素上所有通过 data- 属性定义的自定义数据属性）。
						by cmh
					-->
					<scroll-view class="VerticalNav nav" scroll-y scroll-with-animation :scroll-top="tabScrollPos"> 
						<view class="cu-item" :class="index==tabCur?'text-green cur':''" v-for="(item, index) in groupGoods" :key="index" :data-id="index" @tap="TabSelect">
						 <text>{{item.cate_name}}</text>
						</view>
						
						<view style="height: 50px;"></view>
					</scroll-view>
					
					<!-- scroll-into-view属性可以指定滚动到指定id的位置（注意id不能以数字开头），程序利用它来定位滚动位置 -->
					<!-- @scroll：滚动事件 -->
					<scroll-view class="VerticalMain goods column" style="width:550upx" scroll-y scroll-with-animation :scroll-into-view="'group-'+tabTap" @scroll="OnVerticalMainScroll"> 
						<view v-for="(groupItem, groupIndex) in groupGoods" :key="groupIndex" :id="'group-'+groupIndex">
							<!-- 
							每类商品在最前面加个类别名称，如果左边tab滚动栏显示不全，这里就可看到完整类别名称；
							同时这个类别元素也是左右scroll-view联动滚动依赖的
							by cmh -->
							<view class="group-head"> 
								{{groupItem.cate_name}}
							</view>
							
							<view v-for="(item, index) in groupItem.subitems" :key="item.product_id" class="item" @click="goGoodsDetail(item)">
								<view class="image">
									<image mode="widthFix" :src="item.image"></image><!-- <easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage> -->
									<view v-if="item.stock == 0" class="sell_out">已售罄</view>
									<view v-if="item.border_pic" :style="{ backgroundImage: `url(${item.border_pic})` }" class="border-picture"></view>
								</view>
								<view class="text on acea-row row-between-wrapper" style="width:300rpx">
									<view class="name line2">
										<text class="name_text line1">{{ item.store_name }}</text>
									</view>
									<view class="item_bot">
										<view class="money-wrap acea-row">
											<view class="money">
												¥<text>{{ item.price }}</text>
											</view>
											<view v-if="item.show_svip_info && item.show_svip_info.show_svip_price && item.svip_price" class="acea-row row-middle">
												<text class='vip-money'>￥{{item.svip_price}}</text>
												<view class="vipImg">
													<image class="image" :src="`${domain}/static/images/svip.png`"></image>
												</view>
											</view>
										</view>
										<!-- <view v-if="item.product_type != 0 || item.issetCoupon || item.delivery_free == 1" class="item_tags">
											<text v-if="item.product_type != 0" :class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>
											<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
											<text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
										</view> -->
										<view class="score">{{ item.rate }}评分 {{ item.reply_count }}条评论</view>
									</view>
									<!-- begin 添加商品&立即结算 by cmh -->
									<view v-if="item.stock > 0 || item.cart_num > 0" class='carnum acea-row row-center-wrapper'>
										<view class="reduce" :class="'on'" @click.stop='subCart(item)'>-</view>
										<view class='num'>{{item.cart_num}}</view>
										<view v-if="item.stock > 0" class="plus" :class="'on'" @click.stop='addCart(item)'>+</view>
									</view>
									<!-- end 添加商品&立即结算 by cmh -->
								</view>
								<view v-if="item.max_extension>0 && (item.product_type == 0 || item.product_type == 2)" class="foot">
									<text v-show="!isColumn" class="iconfont"></text>
									最高赚 ¥{{ item.max_extension }}
								</view>
							</view>
						</view>
						<view style="height: 50px;"></view>
					</scroll-view>
				</view>
				<!-- begin 添加商品&立即结算 by cmh -->
				
				<view  v-if="tabActive == 2 && 1 == store.category_id && selectCountNum > 0" class='cart-footer acea-row row-between-wrapper on'>
					<view> 共{{selectCountNum}}件商品 </view>

					<view class='money acea-row row-middle'>
						<text class='t-color'>￥{{selectCountPrice}}</text>
						<form @submit="goSubmitOrder" report-submit='true'>
							<button class='placeOrder' formType="submit">去结算</button>
						</form>
					</view>
				</view>
				<!-- end 添加商品&立即结算 by cmh -->
				
				<!-- end 小卖部 by cmh -->
				
				<!--渔获-->
				<view v-if="tabActive == 3 && 1 == store.category_id">
					<view
						style=" weight: 100%; overflow: scroll; display: flex; flex-direction: column; align-items: center; padding-top: 40rpx;">
						<view class="user-info">
							<image class="avatar" :src="userInfo.avatar" v-if="userInfo.avatar && userInfo.avatar !='/static/f.png'"></image>
							<image v-else class="avatar" src="/static/images/f.png"></image>
							<view class="info">
								<view class="name" v-if="userInfo.uid">
									{{userInfo.nickname}}
								</view>
							</view>
						</view>
						
						<view style="width: 100%; padding: 40rpx 40rpx; display: grid; grid-template-columns: 200rpx 1fr 50rpx; align-content: center; background-color: white;">
							<view>当前鱼票</view>
							<view>{{harvest.ticket}}</view>
							<view style="display: flex; justify-content: flex-end;">
								<span class="iconfont">&#xe6bd;</span>	
							</view>
						</view>
						
						<view style="height: 4rpx;"></view>
						
						<view style="width: 100%; padding: 40rpx 40rpx; display: grid; grid-template-columns: 200rpx 1fr 50rpx; align-content: center; background-color: white;">
							<view>选手钓位</view>
							<view>{{harvest.ticket}}</view>
							<view />
						</view>
						
						<view style="height: 4rpx;"></view>
						
						<view style="width: 100%; padding: 40rpx 40rpx; display: grid; grid-template-columns: 200rpx 1fr 50rpx; align-content: center; background-color: white;">
							<view>开始时间</view>
							<view>{{harvest.ticket}}</view>
							<view />
						</view>
						
						<view style="height: 4rpx;"></view>
						
						<view style="width: 100%; padding: 40rpx 40rpx; display: grid; grid-template-columns: 200rpx 1fr 50rpx; align-content: center; background-color: white;">
							<view>结束时间</view>
							<view>{{harvest.ticket}}</view>
							<view />
						</view>
						
						<view style="height: 4rpx;"></view>
						
						<view style="width: 100%; padding: 40rpx 40rpx; display: grid; grid-template-columns: 200rpx 1fr 50rpx; align-content: center; background-color: white;">
							<view>实时渔获</view>
							<view>{{harvest.ticket}}</view>
							<view />
						</view>
						
						<view style="height: 4rpx;"></view>
						
						<view style="width: 100%; padding: 40rpx 40rpx; display: grid; grid-template-columns: 200rpx 1fr 50rpx; align-content: center; background-color: white;">
							<view>实时金币</view>
							<view>{{harvest.ticket}}</view>
							<view />
						</view>
						
						<view
							style="display: flex; justify-content: center; align-items: center; color: orange; font-weight: bold; margin-top:40rpx;"
							v-if="harvest.warning">{{harvest.warning}}</view>
					
						<view style="width: 100%; ">
							<button class='my-btn-primary btMain' @click="onTapBtn" style="margin:20rpx; width: 700rpx; background-color: var(--view-theme);"
								:disabled="btnDisable">{{harvest.btnTitle}}</button>
						</view>
						
					</view>
				</view>
				
				<!-- 排行榜 -->
				<view v-if="tabActive == 4 && 1 == store.category_id">
					<view class="CommissionRank">
						<view class="header">
							<view class="rank">
								<view v-if="position>0">您目前的排名第<text class="num">{{position}}</text>名</view>
								<view v-else>您目前暂无排名</view>
								<view v-if="isStaff" class="mg-t-lg text-bold lay-c-c" style="text-decoration: underline;" @click="onTapExportExcel">导出EXCEL...</view>
							</view>
						</view>
						<view class="wrapper">
							<!--
							<view class="nav acea-row row-around">
								<view style="color:red" @click="onTapRankType">
									<text>{{rankTypeNames[currRankType]}}</text>
									<text class="iconfont icon-xiala1" style="margin-left: 10rpx; display: inline-block; position: relative; transform: rotate(180deg); -webkit-transform: rotate(180deg);"></text>
								</view>
							</view>-->
							<MyTab2 class="tab pd-xl" :items="ponds" :onChange="onRankTypeChange"></MyTab2>
							
							<scroll-view scroll-y scroll-with-animation class="list">
								<view class="item acea-row row-between-wrapper" v-for="(item,index) in rankList" :key="index">
									<view class="num" v-if="index <= 2">
										<image :src="'/static/images/medal0'+(index+1)+'.png'"></image>
									</view>
									<view class="num" v-else>
										{{index+1}}
									</view>
									<view class="picTxt acea-row row-between-wrapper">
										<view class="pictrue">
											<image :src="item.userAvatar ? item.userAvatar : '/static/images/f.png'"></image>
										</view>
										<view class="text line1">{{item.userNickname}}</view>
									</view>
									<view>{{item.seatNo}}号</view>
									<view class="people font-color">{{item.ypRetPriceType==2?item.totalRetWeight+'斤':item.totalRetWeight+'斤'}}</view>
								</view>
								
								<view class="vspace-xxl"></view>
							</scroll-view>
						</view>
						
						<view v-if="sumWeight && sumWeight.length > 0" class="fix-view">
							<view class="lay-c-c title pd-md">{{sumWeight}}</view>
						</view>
					</view>
					
					<!-- <view style="margin: 40rpx; text-align: center;color: gray;"> ... 只排前{{limitRank}}名，未进榜的钓友们加油啊😕 </view> -->
					
					<!-- ====== begin 日期选择对话框 ====== -->
					<view :class="{modal:true, 'bottom-modal':true, show:showDatePickerDialog}" @click="showDatePickerDialog=false">
						<view class="dialog" @click.stop="">
							<view class="lay-c-c mg-md title">
								选择导出日期
							</view>
							
							<picker-view :indicator-style="indicatorStyle" :value="datePickerValue" @change="onDatePickerChange" class="picker-view">
								<picker-view-column>
									<view class="lay-c-c" v-for="(item,index) in datePickerYears" :key="index"><text>{{item}}年</text></view>
								</picker-view-column>
								<picker-view-column>
									<view class="lay-c-c" v-for="(item,index) in datePickerMonths" :key="index"><text>{{item}}月</text></view>
								</picker-view-column>
								<picker-view-column>
									<view class="lay-c-c" v-for="(item,index) in datePickerDays" :key="index"><text>{{item}}日</text></view>
								</picker-view-column>
							</picker-view>
							
							<view class="lay-c-c mg-v-md mg-h-xxxl">
								<button class="btn bk-white flex1 title" @click="onTapDatePickerOK">导出</button>
							</view>
							
						</view>
					</view>
					<!-- ====== end 日期选择对话框 ====== -->
					
				</view>
				
				<!-- begin 鱼讯 by cmh -->
				<scroll-view v-if="tabActive == 5 && 1 == store.category_id" class="fish-notify" scroll-y="true">
					<fishNotify ref="fishnotify" :mer_id="id"></fishNotify>
				</scroll-view>
				<!-- end 鱼讯 by cmh -->
				
				<!-- 商品分类 -->
				<view v-show="tabActive == 2 && 1 != store.category_id">
					<view class="category">
						<view class="section">
							<view class="head" @click="goCategoryGoods('')">
								<view class="title">全部</view>
								<view class="iconfont icon-xiangyou"></view>
							</view>
						</view>
						<view v-for="item in category" :key="item.store_category_id" class="section">
							<view class="head" @click="goCategoryGoods(item.store_category_id)">
								<view class="title">{{ item.cate_name }}</view>
								<view class="iconfont icon-xiangyou"></view>
							</view>
							<view v-if="item.children" class="body">
								<view v-for="value in item.children" :key="value.store_category_id" class="item" @click="goCategoryGoods(value.store_category_id)">{{ value.cate_name }}</view>
							</view>
						</view>
					</view>
					<view class="acea-row row-center-wrapper loadingicon">
						<text :hidden="!categoryLoading" class="iconfont icon-jiazai loading"></text>
						{{loadTitle}}
					</view>
					
				</view>
				
				<!-- 优惠券 -->
				<view v-show="tabActive == 3 && 1 != store.category_id">
					<view v-if="coupon.length" class="coupon">
						<view v-for="item in coupon" :key="item.coupon_id" class="item">
							<view class="left gary" v-if="item.issue">
								<view class="money">
									¥
									<text>{{ item.coupon_price }}</text>
								</view>
								<view>满{{ item.use_min_price }}元可用</view>
							</view>
							<view class="left" v-else :style="{ 'background-image': `url(${domain}/static/diy/couponBg${keyColor}.png)` }">
								<view class="money">
									¥
									<text>{{ item.coupon_price }}</text>
								</view>
								<view>满{{ item.use_min_price }}元可用</view>
							</view>
							<view class="right">
								<view class="name line1">
									<text :class="{gary:item.issue}">{{item.type===0?'店铺券':'商品券'}}</text>
									{{ item.title }}
								</view>
								<view class="time-wrap" style="justify-content: space-between;">
									<block v-if="item.coupon_type == 1">
										<view class="time">{{ item.use_start_time | dateFormat }}-{{ item.use_end_time | dateFormat }}</view>
									</block>
									<block v-if="item.coupon_type == 0">
										<view>领取后{{ item.coupon_time}}天内可用</view>
									</block>
									<block v-if="item.issue">
										<view class="gary iconfont icon-yilingqu2"></view>
									</block>
									<block v-else>
										<view class="button" @click="receiveCoupon(item)">立即领取</view>
									</block>
								</view>
							</view>
						</view>
					</view>
					<emptyPage v-if="coupon.length == 0" title="暂无优惠券~"></emptyPage>
				</view>
				<!--活动专场-->
				<view v-show="tabActive == 4 && 1 != store.category_id">
					<block v-if="topicList.length>0">
						<view class="main_count">
							<navigator v-for="(item,index) in topicList" :key='item.group_data_id' :url="`/pages/activity/topic_detail/index?id=${item.group_data_id}`" hover-class="none">
								<view class='list'>
									<image :src="item.pic" class="picture"></image>
								</view>
							</navigator>
						</view>
					</block>
					<block v-else>
						<view class='empty-box' v-cloak>
							<image src='../static/images/no-topic.png'></image>
							<view class="txt">暂无活动专场哦~</view>
						</view>
					</block>
				</view>
			</view>
			
		</view><!-- </scroll-view> -->

		<view class="footer" :style="viewColor" :class="{noPointer : preview}">
			<view v-for="(item, index) in tabs" :key="index" :class="{ active: tabActive === item.value }" class="item" @click="tab(item.value)">
				<view :class="['iconfont', item.icon]"></view>
				<view>{{ item.name }}</view>
			</view>
		</view>
	</view>
</template>

<script>
	// +----------------------------------------------------------------------
	// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
	// +----------------------------------------------------------------------
	// | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
	// +----------------------------------------------------------------------
	// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
	// +----------------------------------------------------------------------
	// | Author: CRMEB Team <admin@crmeb.com>
	// +----------------------------------------------------------------------
	import request from "@/utils/request.js";
	import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
	import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'
	import {getStoreDetail,	getStoreGoods, getStoreCategory, followStore, unfollowStore, storeServiceList, hasServiceApi, postCartAdd, postCartChange, getHotBanner} from '@/api/store.js';
	import { initiateAssistApi, getTopicList } from '@/api/activity.js';
	import { getShopCoupons, setCouponReceive, getDiy } from '@/api/api.js';
	import { getUserInfo } from '@/api/user.js';
	import { configMap } from "@/utils";
	import { mapGetters } from "vuex";
	import { goShopDetail } from '@/libs/order.js';
	import history from "@/mixins/history";
	import emptyPage from '@/components/emptyPage.vue'
	import shareScence from "@/libs/spread";
	import { HTTP_REQUEST_URL } from '@/config/app';
	import { toLogin } from '@/libs/login.js';
	import mConfig from '../component/index.js';
	import {
		queryFshRanks,
		queryFshRanks2
	} from '@/api/fsh.js';
	// #ifdef MP || APP-PLUS
	import activeParty from '../../index/component/activeParty';
	import coupon from '../../index/component/coupon';
	import bargain from '../../index/component/bargain';
	import blankPage from '../../index/component/blankPage';
	import combination from '../../index/component/combination';
	import goodList from '../../index/component/goodList';
	import guide from '../../index/component/guide';
	import liveBroadcast from '../../index/component/liveBroadcast';
	import menus from '../../index/component/menus';
	import topic from '../../index/component/topic';
	import presellList from '../../index/component/presellList';
	import richText from '../../index/component/richText';
	import seckill from '../../index/component/seckill';
	import swiperBg from '../../index/component/swiperBg';
	import pictureCube from '../../index/component/pictureCube'
	import titles from '../../index/component/titles';
	import MyTab2 from '@/components/my/MyTab2.vue';
	
	// begin 鱼讯 by cmh
	import fishNotify from '@/components/fishNotify/fishNotify.vue';
	// end 鱼讯 by cmh
	
	// #endif
	const app = getApp();	
	export default {
		components: {
			...mConfig,
			emptyPage,
			WaterfallsFlow,
			easyLoadimage,
			// #ifdef MP || APP-PLUS
			activeParty,
			bargain,
			coupon,
			blankPage,
			combination,
			goodList,
			guide,
			liveBroadcast,
			menus,
			topic,
			presellList,
			richText,
			seckill,
			swiperBg,
			pictureCube,
			titles,
			MyTab2,
			// #endif
			
			// begin 鱼讯 by cmh
			fishNotify
			// end 鱼讯 by cmh
		},
		mixins: [history],
		filters: {
			dateFormat: function(value) {
				if (!value) {
					return '';
				}
				return value.split(' ')[0].replace('-', '.');
			}
		},
		data() {
			return {
				domain: HTTP_REQUEST_URL,
				// #ifdef MP
				menuButtonInfo: uni.getMenuButtonBoundingClientRect(),
				// #endif
				id: 0, // 商铺id
				store: {}, // 商铺详情
				goods: [], // 商铺商品
				category: [], // 商铺分类
				coupon: [], // 优惠券
				productList: [], //本地服务商品
				styleConfig: [],
				isColumn: true, // 商品列表排列方式
				navShow: false,
				navActive: 0,
				diyActive: 0,
				tabActive: 0, // 底部切换
				isCoupon: 0,
				keyword: '',
				order: '',
				sortPrice: true, // 价格排序
				goodsLoading: false,
				categoryLoading: false,
				loadTitle: '加载更多',
				loadend: false,
				where: {
					order: '',
					keyword: '',
					page: 1,
					limit: 30
				},
				
				// begin 轮播图 by cmh
				slideImgs: [],
				swiperCur: 0,
				circular: true,
				autoplay: true,
				interval: 3000,
				duration: 500,
				// end 轮播图 by cmh
				
				// 下拉菜单
				select: {
					show: false,
					selected: 0,
					options: [{
							id: 0,
							name: '默认'
						},
						{
							id: 1,
							name: '评分'
						}
					]
				},
				// 底部菜单
				tabs1: [{
						icon: 'icon-yizhan_o',
						name: '首页',
						value: 1,
					},
					{
						icon: 'icon-yingyongAPP_o',
						name: '分类',
						value: 2,
					},
					{
						icon: 'icon-liwu_o',
						name: '优惠卷',
						value: 3,
					},
					{
						icon: 'icon-gouwu_o',
						name: '专场',
						value: 4,
					}
				],
				// 底部菜单
				tabs2: [{
						icon: 'icon-yizhan_o',
						name: '首页',
						value: 1,
					},
					{
						icon: 'icon-gouwu_o',
						name: '商品',
						value: 3,
					},
					{
						icon: 'icon-yingyongAPP_o',
						name: '分类',
						value: 2,
					},
					{
						icon: 'icon-zhuanti',
						name: '专场',
						value: 4,
					}
				],
				tabs3: [{
						icon: 'icon-yizhan_o',
						name: '鱼票',
						value: 1,
					},
					{
						icon: 'icon-gouwu_o',
						name: '饵料',
						value: 2,
					},
					{
						icon: 'icon-yingyongAPP_o',
						name: '渔获',
						value: 3,
					},
					{
						icon: 'icon-zhuanti',
						name: '排行榜',
						value: 4,
					},
					{
						icon: 'icon-liwu_o',
						name: '鱼讯',
						value: 5,
					}
				],
				tabs: [],
				storeScroll: true,
				storeTop: 0,
				navHeight: 0,
				currSpid: "",
				topicList: [],
				service_open: false,
				type: 0,
				statusBarHeight: 0,
				serviceInfo: {},
				preview: false,
				
				// begin 小卖部 by cmh
				needCalcPos: true,
				tabScrollPos: 0,
				tabCur: 0,
				tabTap: -1,
				groupGoods: [],
				
				// begin 添加商品&立即结算 by cmh
				selectCountNum: 0,
				selectCountPrice: 0.00,
				// end 添加商品&立即结算 by cmh
				
				// end 小卖部 by cmh
				
				// begin 排行榜 by cmh
				sumWeight: 0,
				// end  排行榜 by cmh
				
				harvest: {
					btnTitle: "刷新",
				},
			}
		},
		computed: {
			score: function() {
				let store = this.store,
					score = {
						star: 0,
						number: 0
					};
				if ('postage_score' in store) {
					score.number = (parseFloat(store.postage_score) + parseFloat(store.product_score) + parseFloat(store.service_score)) /
						3;
					score.star = score.number / 5 * 100;
				}
				return score;
			},
			...configMap({
				margin_ico_switch: 0,
				margin_ico: '',
			}, mapGetters(['isLogin','uid','viewColor','keyColor'])),
		},
		watch: {
			tabActive: function(value, old) {
				console.log("tabActive: "+value);
				// begin: spec for FPM
				if(1 == this.store.category_id) {
					this.goods = [];
					this.where.page = 0;
					switch (value) {
						case 1:
							this.resetParmas();
							this.where.order = this.order == 1 ? 'is_new' : '';
							this.where.action = this.order == 2 ? 1 : '';
							this.where.scene = 1;
							this.getGoods();
							break;
						// begin 小卖部 by cmh
						case 2:
							this.needCalcPos = true;
							this.where.scene = 2;
							this.getGoods();
							break;
						// end 小卖部 by cmh
						case 3:
							if (this.isLogin === false)
								toLogin();
							break;
						case 4:	
							break;
						case 5:
							this.$nextTick(() => { 
								// 为什么要放到nextTick中？因为此时fishnotify还未生成。by cmh
								this.$refs.fishnotify.getPresellProductList();
							});
							break;
					}
					return;
				}
				// :end
				
				switch (value) {
					case 1:
						if(this.goods.length == 0 && this.isCoupon == 0){
							this.resetParmas();
							this.where.order = this.order == 1 ? 'is_new' : '';
							this.where.action = this.order == 2 ? 1 : '';
							this.getGoods();
						}else if(this.isCoupon == 1){
							this.getCoupon();
						}
						break;
					case 2:
						this.getCategory();
						break;
					case 3:
						this.resetParmas();
						this.goods = [];
						this.getGoods();
						break;
					case 4:	
						this.getTopic();
						break;
					case 5:
						if(this.productList.length == 0){
							this.resetParmas();
							this.get_service_list();
						}
						break;
					case 6:
						this.getCoupon();
						break;
				}
			},
		},
		onLoad: function(options) {
			this.type = parseInt(options.type) || 1
			this.id = options.mer_id || options.id || 0;
			this.isCoupon = options.coupon || 0;
			this.diyActive = options.order || 0;
			this.order = options.order;
			this.preview = options.time ? true : false;
			if (options.spid) {
				this.currSpid = options.spid
				app.globalData.spid = options.spid;
			}
			// #ifdef MP
			if (options.scene) {
				let value = this.$util.getUrlParams(decodeURIComponent(options.scene));
				if (value.id ) this.id = value.id || 0;
				//记录推广人uid
				if (value.spid) {
					this.currSpid = value.spid
					app.globalData.spid = value.spid;
				}
			}
			// #endif
			this.getStore();
			this.diyData();
			shareScence(this.currSpid, this.isLogin)	
			this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
			
			// begin 轮播图 by cmh
			// 数据在 后台/维护/开发配置/组合数据，以_home_banner结尾的
			// 这里查的是store_home_banner，这个组合数据是我添加的，注意需要在
			//     phpserver232\app\controller\api\Common.php function hotBanner($type) 
			//     if (!in_array($type, ['new', 'hot', 'best', 'good', 'store']))
			//     添加对应类型
			console.log("getHotBanner ...");
			getHotBanner("store").then(res => {
				console.log("getHotBanner:", res);
				this.slideImgs = res.data;
			}).catch(res => {
				console.log(res);
			});
			// end 轮播图 by cmh
		},
		onShow() {
		},
		onReady: function() {

		},
		/**
		 * 用户点击右上角分享
		 */
		// #ifdef MP
		onShareAppMessage: function() {
			wx.showShareMenu({
				withShareTicket: true,
				menus: ['shareAppMessage', 'shareTimeline']
			})
			let that = this;
			return {
				title: that.store.mer_name || '',
				imageUrl: that.store.mer_avatar || '',
				path: '/pages/store/home/index?id=' + that.id + '&spid=' + that.uid,
			}
		},
		onShareTimeline: function() {
			let that = this;
			return {
				title: that.store.mer_name || '',
				query: {
					id: that.id,
					spid: that.uid
				},
				imageUrl: that.store.mer_avatar || ''
			}
		},
		// #endif
		mounted: function() {
			const query = uni.createSelectorQuery().in(this);
			query.select('#store').boundingClientRect(data => {
				this.storeHeight = data.height;
				this.storeTop = data.top;
			}).exec();
		},
		methods: {
			// begin 轮播图 by cmh
			swiperChange(e) {
				// this.swiperCur = e.detail.current
				let {
					current,
					source
				} = e.detail;
				if (source === 'autoplay' || source === 'touch') {
					//根据官方 source 来进行判断swiper的change事件是通过什么来触发的，autoplay是自动轮播。touch是用户手动滑动。其他的就是未知问题。抖动问题主要由于未知问题引起的，所以做了限制，只有在自动轮播和用户主动触发才去改变current值，达到规避了抖动bug
					this.swiperCur = e.detail.current;
				}
			},
			// end 轮播图 by cmh
			
			call: function(){
				let that = this;
				if(that.store.service_phone){
					uni.showModal({
						title: '提示',
						content: '暂无在线客服，确定拨打客服电话:'+that.store.service_phone+'吗？',
						success: function(res) {
							if (res.confirm) {
								uni.makePhoneCall({
								  phoneNumber: that.store.service_phone,
								});
							}
						}
					})
				}else{
					return that.$util.Tips({
						title: '暂无可用客服'
					})
				}
			},
			onTouchmove(e){
				if (this.loadend) return;
				if (this.loading) return;
				if (this.goodsLoading) return;
				const query = uni.createSelectorQuery().in(this);
				query.select('#goods').boundingClientRect(data => {
					if(data.bottom < 1500 && data.top < 0) {
						this.getGoods();
					}
				}).exec();
				// 模拟触底刷新
			},
			onTouchmoves(e){
				if (this.loadend) return;
				if (this.loading) return;
				if (this.goodsLoading) return;
				const query = uni.createSelectorQuery().in(this);
				query.select('#product').boundingClientRect(data => {
					if(data.bottom < 1500 && data.top < 0) {
						this.get_service_list();
					}
				}).exec();
			},
			// 打开授权
			authOpen: function() {
				toLogin()
			},
			setDiy() {
				this.diyActive = 0;
			},
			// 获取diy模板数据
			diyData() {
				let that = this;
				getDiy({id: that.id, version: '221'}).then(res => {
					let data = res.data;
					that.styleConfig = that.objToArr(data.value);
					that.styleConfig.forEach((item, index, arr) => {
						item.did = data.id
					});
					uni.setNavigationBarTitle({
						title: data.title
					});
				}).catch(err => {
					uni.showToast({
						title: err,
						icon: 'none'
					});		
				});
			},
			// 对象转数组
			objToArr(data) {
				let obj = Object.keys(data).sort();
				let m = obj.map(key => data[key]);
				return m;
			},
			goService(){
				let that = this;
				if (that.isLogin === false) {
					toLogin()
				} else {
					uni.navigateTo({
						url: `/pages/chat/customer_list/chat?mer_id=${this.store.mer_id}&uid=${this.uid}`,
					});
				}
			},
			// 本地生活服务商品
			get_service_list: function(isPage) {
				let that = this;
				if (that.loadend) return;
				if (that.loading) return;
				if (that.goodsLoading) return;
				that.goodsLoading = true;
				that.loadTitle = '';
				storeServiceList(that.id, that.where).then(res => {
					that.goodsLoading = false;
					let list = res.data.list;
					let productList = that.$util.SplitArray(list, that.productList);
					let loadend = list.length < that.where.limit;
					that.loadend = loadend;
					that.loading = false;
					that.loadTitle = loadend ? '加载更多' : '已全部加载';
					that.$set(that, 'productList', productList);
					that.$set(that.where, 'page', that.where.page + 1);
				}).catch(err => {
					that.loading = false;
					that.goodsLoading = false;
					uni.showToast({
						title: err,
						icon: 'none'
					})
					setTimeout(function() {
						uni.navigateBack()
					}, 1000);
				});
			},
			// 领取优惠券
			receiveCoupon(item) {
				let that = this;
				if (that.isLogin === false) {
					toLogin()
				} else {
					setCouponReceive(item.coupon_id).then(res => {
						item.issue = 1
						uni.showToast({
							title: res.message,
							icon: 'none'
						})
					}).catch(err => {
						uni.showToast({
							title: err,
							icon: 'none'
						})
					})
				}
			},
			// 获取商品详情
			getStore: function() {
				getStoreDetail(this.id).then(res => {
					// res举例：{"status":200,"message":"success","data":{"mer_type_name":"旗舰店","isset_certificate":false,"services_type":0,"mer_id":77,"category_id":1,"type_id":3,"mer_name":"爱钓","mer_address":"广东省深圳市宝安区西乡宝源路 阳光海湾花园6栋B座1308","mer_keyword":"","mer_avatar":"https:\/\/www.zhidiaotianxia.com\/uploads\/def\/20240812\/2118e9677aef2c0ed4c4ba8bda5c1d06.jpg","mer_banner":"https:\/\/www.zhidiaotianxia.com\/uploads\/def\/20240812\/2118e9677aef2c0ed4c4ba8bda5c1d06.jpg","mini_banner":"","sales":0,"product_score":"5.0","service_score":"5.0","postage_score":"5.0","mark":"0.01","status":1,"commission_rate":"0.00","commission_switch":0,"long":"","lat":"","is_bro_room":1,"is_bro_goods":1,"is_trader":0,"mer_info":"test","service_phone":"","create_time":"2024-08-12 20:19:50","care_count":1,"copy_product_num":0,"export_dump_num":0,"mer_money":"0.00","sub_mchid":"","delivery_way":["2"],"delivery_balance":"0.00","margin":"0.00","margin_remind_time":null,"ot_margin":"0.01","is_margin":0,"care":true,"type_name":"旗舰店"}}
					this.store = res.data;
					if((res.data.delivery_way.length == 1 && res.data.delivery_way[0] == '1') || res.data.delivery_way.length == 2){
						this.tabs = this.tabs1
						this.service_open = true
					}else{
						this.tabs = this.tabs2
						this.service_open = false
					}
					
					if(1 == this.store.category_id) {
						this.tabs = this.tabs3
					}
					else {
						this.tabs = this.tabs1;
					}
					
					this.service_open = false
					this.tab(this.type)
					// #ifdef H5
					this.ShareInfo();
					// #endif
					
				}).catch(err => {
					this.loading = false;
					uni.showToast({
						title: err,
						icon: 'none'
					})
					// setTimeout(function() {
					// 	uni.navigateBack()
					// }, 1000);
				})
			},
			// 获取商铺商品
			getGoods: function() {
				let that = this;
				if (that.loadend) return;
				if (that.loading) return;
				if (that.goodsLoading) return;
				that.goodsLoading = true;
				that.loadTitle = '';
				getStoreGoods(that.id, that.where).then(res => {
					that.goodsLoading = false;
					let list = [];
					for(let i=0;i<res.data.list.length;i++){
						if(parseInt(res.data.list[i].price)!=0){
							list.push(res.data.list[i]);
						}
					}
					
					console.log(666,res.data.list);
					
					list.forEach(m=>{
						if(m.merchant && m.merchant.mer_name) 
							m.merchant.mer_name = ''; // 不显示店铺名称
						
						if(that.where.scene==1)
							m.delivery_free = 0; // 不显示包邮
						
						// begin 小卖部 by cmh	
						// begin 添加商品&立即结算 by cmh
						if(!m.cart_num)
							m.cart_num = 0;
						// end 添加商品&立即结算 by cmh
						// end 小卖部 by cmh
					});
					
					let goodsList = that.$util.SplitArray(list, that.goods);
					
					
					// begin 小卖部 by cmh
					if(that.where.scene==2) {
						let a = that.$util.groupBy(goodsList, "cate_name");
						that.$set(that, 'groupGoods', a);
						
						let sumNum = 0, sumPrice = 0;
						a.forEach(g=>{
							g.subitems.forEach(item=>{
								if(item.cart_num) {
									sumNum += item.cart_num;
									sumPrice += Number.isNaN(item.price)?0:parseFloat(item.price);
								}
							})
						})
						that.selectCountNum = sumNum;
						that.selectCountPrice = sumPrice;
					}
					// end 小卖部 by cmh
					
					let loadend = list.length < that.where.limit;
					that.loadend = loadend;
					that.loading = false;
					that.loadTitle = loadend ? '已全部加载' : '加载更多';
					that.$set(that, 'goods', goodsList);
					that.$set(that.where, 'page', that.where.page + 1);
				}).catch(err => {
					console.log("getStoreGoods exception", err)
					that.loading = false;
					that.goodsLoading = false;
					uni.showToast({
						title: err,
						icon: 'none'
					})
					setTimeout(function() {
						uni.navigateBack()
					}, 1000);
				});
			},
			// 获取商铺分类
			getCategory: function() {
				if (this.category.length) {
					return;
				}
				this.categoryLoading = true;
				getStoreCategory(this.id).then(res => {
					this.categoryLoading = false;
					this.category = res.data;
					this.loadTitle = '已全部加载';
				});
			},
			// 获取商铺优惠券
			getCoupon: function() {
				this.diyActive = 3
				if (this.coupon.length) {
					return;
				}
				getShopCoupons(this.id).then(res => {
					this.coupon = res.data;
				});
			},
			// 获取商铺活动专题
			getTopic(){
				if (this.topicList.length) {
					return;
				}
				getTopicList(this.id,{page: 1, limit: 999}).then(res => {
					this.topicList = res.data;
				});
			},
			// 关注商铺
			follow: function() {
				followStore(this.id).then(res => {
					if (res.status === 200) {
						this.store.care = true;
					}
					this.$util.Tips({
						title: res.message
					});
				});
			},
			// 取消关注
			unfollow: function() {
				unfollowStore(this.id).then(res => {
					if (res.status === 200) {
						this.store.care = false;
					}
					this.$util.Tips({
						title: res.message
					});
				});
			},
			// 设置是否关注
			followToggle: function() {
				this.store.care ? this.unfollow() : this.follow();
			},
			// 选择条件展示商品
			set_where: function(param,isDiy) {
				this.select.show = false;
				this.loading = false;
				this.loadend = false;
				this.where.page = 1;
				this.goods = [];
				this.where.action = ""
				switch (param) {
					case 0:
						this.select.selected = 0;
						this.where.order = '';
						this.getGoods();
						break;
					case 1:
						this.select.selected = 1;
						this.where.order = 'rate';
						this.getGoods();
						break;
					case 2:
						this.navActive = 1;
						this.where.order = 'sales';
						this.getGoods();
						break;
					case 3:
						this.navActive = 2;
						this.sortPrice = !this.sortPrice;
						this.where.order = this.sortPrice ? 'price_asc' : 'price_desc';
						this.getGoods();
						break;
					case 4:
						if(isDiy == 1 || isDiy == 2) this.diyActive = isDiy
						this.navActive = 3;
						this.where.order = 'is_new';
						this.getGoods();
						break;
					case 5:
					if(isDiy == 1 || isDiy == 2) this.diyActive = isDiy
						this.navActive = 5;
						this.where.action = 1;
						this.where.order = ""
						this.getGoods();
						break;
				}
			},

			// 去分类商品页
			goCategoryGoods: function(id) {
				uni.navigateTo({
					url: `/pages/store/list/index?id=${id}&mer_id=${this.id}`
				})
			},
			// 去商品详情页
			goGoodsDetail(item) {
				goShopDetail(item, this.uid).then(res => {
					if (this.isLogin) {
						initiateAssistApi(item.activity_id).then(res => {
							let id = res.data.product_assist_set_id;
							uni.hideLoading();
							uni.navigateTo({
								url: '/pages/activity/assist_detail/index?id=' + id
							});	
						}).catch((err) => {
							uni.showToast({
								title: err,
								icon: 'none'
							})
						});
					} else {
						toLogin()
					}
				})
			},
			// 商铺首页滚动 navbar 吸顶
			scrollHome: function(e) {
				uni.$emit('scroll');
				this.navShow = e.detail.scrollTop >= 50;
			},
			goback: function() {
				uni.navigateBack();
			},
			// 首页
			goHome() {
				uni.switchTab({
					url: '/pages/index/index'
				});
			},
			// 商铺底部切换
			tab: function(param) {
				this.tabActive = param;
				this.goodsLoading = this.loadend = this.loading = false
			},
			resetParmas(){
				this.where = {
					order: '',
					keyword: '',
					page: 1,
					limit: 30
				}
			},
			//#ifdef H5
			ShareInfo() {
				let data = this.store;
				let href = location.href;
				if (this.$wechat.isWeixin()) {
					getUserInfo().then(res => {
						href =
							href.indexOf("?") === -1 ?
							href + "?spid=" + res.data.uid :
							href + "&spid=" + res.data.uid;
						let configAppMessage = {
							desc: data.mer_info,
							title: data.mer_name,
							link: href,
							imgUrl: data.mer_avatar
						};
						this.$wechat.wechatEvevt([
							"updateAppMessageShareData",
							"updateTimelineShareData",
							"onMenuShareAppMessage",
							"onMenuShareTimeline"
						], configAppMessage).then(res => {}).catch(err => {
							console.log(err);
						})
					});
				}
			},
			//#endif
			
			// begin 小卖部 by cmh
			TabSelect(e) { // 点击左边tab项后，通过计算进行滚动定位 by cmh
				this.tabCur = e.currentTarget.dataset.id;
				this.tabScrollPos = e.currentTarget.dataset.id * 50 // “.VerticalNav.nav .cu-item”中指定了Tab导航栏元素高度为50px
				this.tabTap = this.tabCur; // fix 滚动问题：当滚动到出现一个新的tab时，容易出现回弹
				console.log("tabSelect| id="+e.currentTarget.dataset.id);
			},
			OnVerticalMainScroll(e) {
				let that = this;
				if (this.needCalcPos) {
					this.needCalcPos = false;
					// let y = 0;
					// for (let i = 0; i < this.groupGoods.length; i++) {
					// 	this.groupGoods[i].top = y;
					// 	y += 19 + this.groupGoods[i].subitems.length*134;
					// 	this.groupGoods[i].bottom = y;
					// 	y += 1;
					// }
					let tabHeight = 0;
					for (let i = 0; i < this.groupGoods.length; i++) {
						let view = uni.createSelectorQuery().select("#group-" + i);
						view.fields({
							size: true
						}, data => {
							if(!data) {
								this.needCalcPos = true;
								console.log("TabSelect| CalcPos Error, idx="+i);
							}
							else {
								this.groupGoods[i].top = tabHeight;
								tabHeight = tabHeight + data.height;
								this.groupGoods[i].bottom = tabHeight;
							}
						}).exec();
					}
				}
				
				let scrollTop = e.detail.scrollTop + 10;
				//console.log("retFshManage::OnVerticalMainScroll| scrollTop=%o", scrollTop);
				for (let i = 0; i < this.groupGoods.length; i++) {
					if (scrollTop > this.groupGoods[i].top && scrollTop < this.groupGoods[i].bottom) {
						this.tabScrollPos = i * 50;
						this.tabCur = i; 
						this.tabTap = -1;
						//console.log("retFshManage::OnVerticalMainScroll| tabScrollPos=%o, tabCur=%o", this.tabScrollPos, this.tabCur);
						return false
					}
				}
			},
			
			// begin 添加商品&立即结算 by cmh
			addCart(item) {
				if(!item.cart_id) {
					let q = {
						is_new: 0,
						product_id: item.product_id,
						cart_num: 1,
						product_attr_unique: item.unique, // unique指sku的unique. by cmh
						product_type: item.product_type,
						spread_id: this.currSpid
					};
					postCartAdd(q)
					.then(res => {
						let cartId = res.data.cart_id
						
						item.cart_id = cartId;
						item.cart_num += 1;
						// item.cart_id = cartId; // 同一个商品，添加多次购物车，返回的cart_id相同（待验证）。 by cmh
						this.selectCountNum += 1;
						this.selectCountPrice += parseFloat(item.price);
						console.log("this.selectCountNum: " + this.selectCountNum);
					})
					.catch(res => {
						return this.$util.Tips({
							title: res
						});
					});
				}
				else {
					postCartChange(item.cart_id, {cart_num: item.cart_num + 1, product_attr_unique: item.unique})
					.then(res => {
						item.cart_num += 1;
						this.selectCountNum += 1;
						this.selectCountPrice += parseFloat(item.price);
					})
					.catch(res => {
						return this.$util.Tips({
							title: res
						});
					});
				}
			},
			subCart(item) {
				if(item.cart_num > 0) {
					postCartChange(item.cart_id, {cart_num: item.cart_num - 1, product_attr_unique: item.unique})
					.then(res => {
						item.cart_num -= 1;
						this.selectCountNum -= 1;
						this.selectCountPrice -= parseFloat(item.price);
					})
					.catch(res => {
						return this.$util.Tips({
							title: res
						});
					});
				}
				else
					item.cart_num = 0;
			},
			goSubmitOrder() {
				let cart_id_ary = []
				this.groupGoods.forEach(g=>{
					g.subitems.forEach(item=>{
						if(item.cart_num)
							cart_id_ary.push(item.cart_id);
					})
				})
				uni.navigateTo({
					url: '/pages/users/order_confirm/index?cartId=' + cart_id_ary.join(',')
				});
			},
			// end 添加商品&立即结算 by cmh
			
			// end 小卖部 by cmh
		},
		onReachBottom() {
			// 模拟触底刷新
			if(this.tabActive == 0){
				setTimeout(()=>{
					this.goods.push(...this.goods);
				},500)
			}
		},
		onPullDownRefresh(){
			// 模拟上拉刷新
			setTimeout(()=>{
				const newList = this.goods.reverse();
				this.goods = newList;
				uni.stopPullDownRefresh();
			},500)
		}
	}
</script>

<style lang="scss" scoped>
	$headerHeight: 86rpx;
	$storeHeaderHeight: 120rpx; 
	
	// begin 轮播图 by cmh
	$swiperHeight: 380rpx;
	.swiper {
		background-color: rgb(239, 251, 255);
		position: relative;
		padding-top: 20rpx;
		width: 100%;
		/* #ifdef MP  */
		height: auto;
		/* #endif */
		/* #ifdef H5 || APP-PLUS */
		height: $swiperHeight;
		/* #endif */
	
		margin: 0 auto;
		border-radius: 10rpx;
		overflow-x: hidden;
		/* #ifdef MP */
		z-index: 0;
	
		/* #endif */
		swiper,
		.swiper-item,
		image {
			width: 100%;
			height: 280rpx;
			border-radius: 10rpx;
		}
	
		.slide-navigator {}
	
		image {
			transform: scale(0.93);
			transition: all 0.6s ease;
		}
	
		swiper-item.active {
			image {
				transform: scale(1);
			}
		}
	}
	// end 轮播图 by cmh
	
	.tab-cont{
		background: #f5f5f5;
		min-height: 500rpx;
	}
	.noPointer{
		pointer-events: none;
	}
	/deep/.care {
		background-image: none !important;
		border: 1px solid #fff;
		background-color: transparent;
	}
	.store-home {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		display: flex;
		flex-direction: column;
		padding-bottom: 100rpx;
		padding-bottom: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
		padding-bottom: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
		background: left top/750rpx 390rpx no-repeat fixed;
		overflow: hidden;
		touch-action: none;
	}
	.header {
		position: relative;
		z-index: 6;
		display: flex;
		align-items: center;
		padding-right: 34rpx;
		height: $headerHeight;
		padding-left: 33rpx;
		.head-menu {
			display: -webkit-box;
			display: -webkit-flex;
			display: flex;
			-webkit-box-align: center;
			-webkit-align-items: center;
			align-items: center;
			height: 27px;
			width: 70px;
			background: rgba(0, 0, 0, 0.25);
			border-radius: 13px;
			.icon-xiangzuo {
				font-size: 32rpx;
				color: #FFFFFF;
			}
			.iconfont {
				-webkit-box-flex: 1;
				-webkit-flex: 1;
				flex: 1;
				text-align: center;
				color: #fff;
				box-sizing: border-box;
				&.icon-xiangzuo {
					border-right: 1px solid rgba(255,255,255,.3);
				}
			}
		}
		.search {
			flex: 1;
			display: flex;
			align-items: center;
			min-width: 0;
			height: 58rpx;
			border-radius: 29rpx;
			margin-left: 32rpx;
			background-color: #FFFFFF;
			font-weight: 500;
			font-size: 26rpx;
			color: #999999;
			/* #ifdef MP */
			margin-right: 200rpx;
			/* #endif */
			.iconfont {
				margin-right: 13rpx;
				margin-left: 30rpx;
				font-size: 24rpx;
			}
		}
	}
	.main_count{
		background-color: #ffffff;
		padding: 30rpx 20rpx;
		.list{
			width: 710rpx;
			height: 280rpx;
			margin-bottom: 30rpx;
			position: relative;
			.picture{
				width: 710rpx;
				height: 280rpx;
				border-radius: 16rpx;
			}
		}
	}
	.main {
		flex: 1;
		min-height: 0rpx;
		box-sizing: border-box;
		padding: 0;
	}
	.store {
		position: relative;
		z-index: 6;
		display: flex;
		align-items: center;
		padding-right: 20rpx;
		padding-left: 20rpx;
		padding-top: 20rpx;
		padding-bottom: 22rpx;
		height: $storeHeaderHeight;
		image {
			width: 74rpx;
			height: 74rpx;
			border-radius: 6rpx;
		}
		.store-margin{
			width: 26rpx;
			height: 26rpx;
			margin-left: 10rpx;
		}
		.kefu{
			color: #ffffff;
			margin-right: 26rpx;
			cursor: pointer;
			.icon-kefu3{
				font-size: 34rpx;
			}
		}
		.text {
			flex: 1;
			min-width: 0;
			margin-right: 20rpx;
			margin-left: 20rpx;
			navigator {
				display: inline-flex;
				align-items: center;
				max-width: 100%;
				.name {
					flex: 1;
					min-width: 0;
					overflow: hidden;
					white-space: nowrap;
					text-overflow: ellipsis;
					font-weight: bold;
					font-size: 30rpx;
					line-height: 1;
					color: #FFFFFF;
				}
				.iconfont {
					margin-left: 10rpx;
					font-size: 17rpx;
					color: #FFFFFF;
				}
			}
			.score {
				display: flex;
				align-items: center;
				margin-top: 17rpx;
				font-weight: 500;
				font-size: 24rpx;
				line-height: 1;
				color: #FFFFFF;
				.star {
					position: relative;
					width: 111rpx;
					height: 19rpx;
					margin-right: 10rpx;
					background: url(../../columnGoods/images/star.png) left top/100% 100% no-repeat;
					overflow: hidden;
					view {
						position: absolute;
						top: 0;
						left: 0;
						width: 100%;
						height: 100%;
						background: url(../../columnGoods/images/star_active.png) left top/111rpx 19rpx no-repeat;
						&.star_purple{
							background: url(../../columnGoods/images/star_active_purple.png) left top/111rpx 19rpx no-repeat;
						}
					}
				}
			}
		}
		button {
			display: flex;
			justify-content: center;
			align-items: center;
			width: 113rpx;
			height: 48rpx;
			border-radius: 24rpx;
			background-image: linear-gradient(-90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
			font-weight: 500;
			font-size: 22rpx;
			color: #FFFFFF;
			.iconfont {
				margin-right: 6rpx;
				font-size: 22rpx;
			}
			&.gary {
				background-color: #999;
			}
		}
	}
	.font-bg-red {
		background-color: var(--view-theme);
	}
	.nav.fixed {
		position: fixed;
		left: 0;
		width: 100%;
		.nav-cont {
			position: absolute;
			width: 100%;
		}
	}
	.nav {
		position: relative;
		.nav-cont {
			display: flex;
			align-items: center;
			height: 84rpx;
			.item {
				flex: 1;
				display: flex;
				justify-content: center;
				align-items: center;
				min-width: 0;
				.cont {
					display: flex;
					justify-content: center;
					align-items: center;
					width: 116rpx;
					height: 44rpx;
					border-radius: 22rpx;
					font-weight: 500;
					font-size: 24rpx;
					color: #FFFFFF;
					.arrow-icon {
						margin-left: 10rpx;
						font-size: 18rpx;
					}
					.layout-icon {
						font-size: 32rpx;
					}
					.icon-pailie {
						font-size: 32rpx;
					}
					image {
						width: 15rpx;
						height: 21rpx;
						margin-left: 7rpx;
					}
				}
			}
			.active {
				.cont {
					background-color: #FFFFFF;
					font-weight: bold;
					color: var(--view-theme);
				}
			}
		}
		.select {
			position: absolute;
			top: 100%;
			left: 0;
			z-index: 2;
			width: 100%;
			padding-right: 40rpx;
			padding-bottom: 28rpx;
			padding-left: 74rpx;
			border-bottom-right-radius: 24rpx;
			border-bottom-left-radius: 24rpx;
			background-color: #FFFFFF;
			box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.06);
			.item {
				margin-top: 28rpx;
				font-size: 24rpx;
				color: #454545;
			}
			.active {
				color: var(--view-theme);
				.iconfont{
					color: var(--view-theme);
					float: right;
					font-size: 20rpx;
				}
			}
		}
	}
	.goods {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		padding-top: 20rpx;
		padding-right: 20rpx;
		padding-left: 20rpx;
		background-color: #F5F5F5;
		// width: 750rpx;
		.item {
			width: 345rpx;
			border-radius: 16rpx;
			margin-bottom: 20rpx;
			background-color: #FFFFFF;
			overflow: hidden;
			.sell_out {
				display: flex;
				width: 110rpx;
				height: 110rpx;
				align-items: center;
				justify-content: center;
				border-radius: 100%;
				background: rgba(0,0,0,.6);
				color: #fff;
				font-size: 24rpx;
				position: absolute;
				top: 50%;
				left: 50%;
				margin: -55rpx 0 0 -55rpx;
				&::before{
					content: "";
					display: block;
					width: 100rpx;
					height: 100rpx;
					border-radius: 100%;
					border: 1px dashed #fff;
					position: absolute;
					top: 5rpx;
					left: 5rpx;
				}
			}
			.image,.easy-loadimage,image,uni-image {
				width: 345rpx;
				height: 345rpx;
				image {
					display: block;
					width: 100%;
					height: 100%;
				}
			}
			.text {
				padding: 20rpx 20rpx 25rpx;
				.name {
					font-weight: 500;
					font-size: 30rpx;
					line-height: 1;
					color: #222222;
					display: flex;
					align-items: center;
					.name_text{
						display: inline-block;
						max-width: 400rpx;
					}
				}
				.money-wrap {
					display: flex;
					align-items: center;
					// margin-top: 43rpx;
					.money {
						font-weight: bold;
						font-size: 26rpx;
						color: var(--view-priceColor);
						text {
							font-size: 34rpx;
							line-height: 1;
						}
					}	
				}
				.score {
					margin-top: 20rpx;
					font-weight: 500;
					font-size: 20rpx;
					line-height: 1;
					color: #737373;
				}
			}
			.item_tags{
				margin-top: 8rpx;
			}
			.item_tags .tags_item {
				display: inline-block;
				font-size: 20rpx;
				text-align: center;
				border-radius: 5rpx;
				padding: 0 4rpx;
				line-height: 28rpx;
				margin-right: 8rpx;
			}
			.item_tags .tags_item.ticket{
				border: 1px solid var(--view-theme);
				color: var(--view-theme);
			}
			.item_tags .tags_item.delivery{
				color: #FF9000;
				border: 1px solid #FF9000;
			}
			.foot {
				display: flex;
				justify-content: center;
				align-items: center;
				height: 52rpx;
				background-image: linear-gradient(-90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
				font-weight: 500;
				font-size: 24rpx;
				color: #FFFFFF;
				.iconfont {
					margin-right: 10rpx;
					font-size: 22rpx;
					line-height: 1;
				}
			}
		}
	}

	.column {
		padding: 0;
		background-color: #FFFFFF;
		.item {
			position: relative;
			display: flex;
			width: 100%;
			padding: 30rpx 20rpx;
			border-radius: 0;
			margin-bottom: 0;
			&::before {
				content: " ";
				position: absolute;
				top: 0;
				right: 20rpx;
				left: 250rpx;
				border-top: 1px solid #F5F5F5;
			}
			/deep/.image,/deep/.easy-loadimage,/deep/image,/deep/uni-image {
				width: 200rpx;
				height: 200rpx;
				border-radius: 16rpx;
				overflow: hidden;
				position: relative;
				
			}
			.border-picture {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				background: center/cover no-repeat;
			}
			.text {
				position: relative;
				//width: 450rpx;
				min-width: 0;
				padding-top: 0;
				padding-right: 0;
				padding-bottom: 0;
				.name {
					color: #282828;
					width: 100%;
					display: flex;
				}
				.item_bot{
					width: 100%;
				}
				.money-wrap {
					display: flex;
					align-items: center;
					// margin-top: 52rpx;
					.ticket {
						height: 28rpx;
						padding-right: 12rpx;
						padding-left: 12rpx;
						border: none;
						border-radius: 0;
						margin-top: 17rpx;
						margin-left: 0;
						background: url(../../../static/images/yh.png) top left/100% 100% no-repeat;
						line-height: 28rpx;
					}
				}
			}
			.foot {
				position: absolute;
				right: 20rpx;
				bottom: 30rpx;
				height: 44rpx;
				padding-right: 17rpx;
				padding-left: 17rpx;
				border-radius: 22rpx;
				font-size: 22rpx;
				color: #F5F5F5;
			}
		}
	}
	.category {
		padding-top: 34rpx;
		padding-right: 20rpx;
		padding-left: 20rpx;
		.section {
			border-radius: 10rpx;
			margin-bottom: 20rpx;
			background-color: #FFFFFF;
			.head {
				position: relative;
				display: flex;
				align-items: center;
				height: 90rpx;
				padding-right: 20rpx;
				padding-left: 36rpx;
				font-weight: bold;
				color: #282828;
				&::before {
					content: " ";
					position: absolute;
					top: 50%;
					left: 20rpx;
					width: 6rpx;
					height: 24rpx;
					background-color: var(--view-theme);
					transform: translateY(-50%);
				}
				.title {
					flex: 1;
					min-width: 0;
					overflow: hidden;
					white-space: nowrap;
					text-overflow: ellipsis;
					font-size: 30rpx;
				}
				.iconfont {
					font-size: 22rpx;
					line-height: 1;
				}
			}
			.body {
				display: flex;
				flex-wrap: wrap;
				justify-content: space-between;
				align-items: center;
				padding: 9rpx 36rpx 14rpx;
				.item {
					width: 314rpx;
					height: 84rpx;
					padding-right: 30rpx;
					padding-left: 30rpx;
					border-radius: 10rpx;
					background-color: #F5F5F5;
					margin-bottom: 10rpx;
					overflow: hidden;
					white-space: nowrap;
					text-overflow: ellipsis;
					font-weight: 500;
					font-size: 26rpx;
					line-height: 84rpx;
					color: #282828;
				}
			}
		}
	}
	.coupon {
		padding: 30rpx;
		background-color: #F5F5F5;
		.item {
			display: flex;
			margin-bottom: 16rpx;
			.left {
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				width: 240rpx;
				font-weight: 500;
				font-size: 24rpx;
				line-height: 1;
				color: #FFFFFF;
				background-size: 100% 100%;
				&.gary {
					background-image: url('');
				}
				.money {
					margin-bottom: 25rpx;
					font-weight: 800;
					font-size: 36rpx;
					text {
						font-size: 60rpx;
					}
				}
			}
			.right {
				flex: 1;
				min-width: 0;
				padding-right: 18rpx;
				padding-left: 27rpx;
				background-color: #FFFFFF;
				position: relative;
				overflow: hidden;
				.name {
					padding-top: 32rpx;
					padding-bottom: 32rpx;
					border-bottom: 1px solid #F0F0F0;
					font-weight: 500;
					font-size: 30;
					line-height: 1;
					color: #282828;
					text {
						display: inline-block;
						text-align: center;
						line-height: 40rpx;
						height: 40rpx;
						padding: 0 10rpx;
						-webkit-box-sizing: border-box;
						box-sizing: border-box;
						background: var(--view-minorColor);
						border: 1px solid var(--view-theme);
						opacity: 1;
						border-radius: 22rpx;
						font-size: 20rpx;
						color: var(--view-theme);
						margin-right: 12rpx;
						&.gary {
							border-color: #BBB;
							color: #bbb;
							background-color: #F5F5F5;

						}
					}
				}
				.time-wrap {
					display: flex;
					align-items: center;
					padding-top: 16rpx;
					padding-bottom: 16rpx;
					font-weight: 500;
					font-size: 20rpx;
					color: #999999;
					.time {
						flex: 1;
						min-width: 0;
					}
					.button {
						width: 136rpx;
						height: 44rpx;
						border-radius: 22rpx;
						background-color: var(--view-theme);
						font-weight: 500;
						font-size: 22rpx;
						line-height: 44rpx;
						text-align: center;
						color: #FFFFFF;
					
					}
					.gary {
						font-size: 130rpx;
						color: #DFDFDF;
						position: absolute;
						right: -15rpx;
						z-index: 0;
						bottom: -20rpx;
					}
				}
			}
		}
		.disabled {
			.left {
				background-image: url(../static/images/coupon2.png);
			}
			.right {
				.name {
					text {
						border-color: #C1C1C1;
						color: #C1C1C1;
					}
				}
				.time-wrap {
					.button {
						background-color: #CCCCCC;
						color: #FFFFFF;
					}
				}
			}
		}
	}
	.empty-box{
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		margin-top: 0;
		padding-top: 200rpx;
		image{
			width: 414rpx;
			height: 240rpx;
		}
		.txt{
			font-size: 26rpx;
			color: #999;
		}
	}
	.footer {
		position: fixed;
		bottom: 0;
		left: 0;
		z-index: 5;
		display: flex;
		width: 100%;
		height: 100rpx;
		height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
		height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
		background-color: #FFFFFF;
		opacity: 0.96;
		.item {
			flex: 1;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			font-weight: 500;
			font-size: 24rpx;
			color: #282828;
			.iconfont {
				font-size: 43rpx;
			}
			.icon-zhuanti{
				font-size: 38rpx;
			}
		}
		.active {
			color: var(--view-theme);
			font-weight: 600;
		}
	}
	.p-b-75{
		padding-bottom: 150rpx;
	}
	.vip-money {
		color: #282828;
		font-size: 22rpx;
		margin-left: 6rpx;
		font-weight: bold;
	}
	.vipImg {
		width: 65rpx;
		height: 28rpx;
		margin-left: 4rpx;
		image {
			width: 100%!important;
			height: 100%!important;
			display: block;
		}
	}
	
	.user-info {
		z-index: 20;
		position: relative;
		flex-direction: column;
		display: flex;
		padding: 0 28rpx;
		.avatar {
			width: 250rpx;
			height: 250rpx;
			border-radius: 50%;
		}
	
		.info {
			flex: 1;
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			padding: 15rpx 0;
	
			.name {
				width: 250rpx;
				text-align: center;
				align-items: center;
				white-space:nowrap;
				color: #333;
				font-size: 62rpx;
			}
		}
	}
	
	
	@import "@/leui.scss";
	
	$navHeight: 120rpx;
	.tab {
		height: $navHeight;
	}
	$headerHeight: 330rpx;
	.CommissionRank .header {
		background: url("") no-repeat;
		width: 100%;
		height: $headerHeight;
		background-size: 100% 100%;
	}
	
	.CommissionRank .header .rank {
		font-size: 33rpx;
		color: #fff;
		position: absolute;
		top: 160rpx;
		left: 30rpx;
	}
	
	.CommissionRank .header .rank .num {
		font-size: 102rpx;
		font-weight: bold;
		margin: 0 10rpx;
	}
	
	.CommissionRank .wrapper {
		// width: 710rpx;
		background-color: #fff;
		// border-radius: 20rpx;
		// margin: 36rpx auto 0 auto;
	}
	
	// .CommissionRank .wrapper .nav {
	// 	height: 99rpx;
	// 	border-bottom: 2.5rpx solid #f3f3f3;
	// 	font-size: 30rpx;
	// 	font-weight: bold;
	// 	color: #999;
	// 	line-height: $navHeight;
	// }
	
	// .CommissionRank .wrapper .nav .item.font-color {
	// 	border-bottom: 4rpx solid #e93323;
	// }
	
	.list {
		height:calc(100vh - #{$headerHeight} - #{$navHeight} - 90rpx); // 对scss变量做calc计算不能直接使用$swiperHeight，要加#{}
		width:calc(100vw - 80rpx);
	}
	
	.CommissionRank .wrapper .list {
		padding: 0 30rpx;
	}
	
	.CommissionRank .wrapper .list .item {
		border-bottom: 1px solid #f3f3f3;
		height: 101rpx;
		font-size: 28rpx;
	}
	
	.CommissionRank .wrapper .list .item .num {
		color: #666;
		width: 70rpx;
	}
	
	.CommissionRank .wrapper .list .item .num image {
		width: 34rpx;
		height: 40rpx;
		display: block;
	}
	
	.CommissionRank .wrapper .list .item .picTxt {
		width: 350rpx;
	}
	
	.CommissionRank .wrapper .list .item .picTxt .pictrue {
		width: 68rpx;
		height: 68rpx;
	}
	
	.CommissionRank .wrapper .list .item .picTxt .pictrue image {
		width: 100%;
		height: 100%;
		display: block;
		border-radius: 50%;
	}
	
	.CommissionRank .wrapper .list .item .picTxt .text {
		width: 262rpx;
		color: #333;
	}
	
	.CommissionRank .wrapper .list .item .people {
		width: 175rpx;
		text-align: right;
	}
	
	.fix-view {
		position: fixed;
		top: px;
		bottom: 15rpx;
		left: 200rpx;
		border-radius: 100rpx;
		width: 300rpx;
		z-index: 1;
		color: #FFFFFF;
		background-color: rgba(255, 0, 0, 0.3);
	}
	
	// begin 日期选择对话框
	.picker-view {
		width: 750rpx;
		height: 600rpx;
		margin-top: 20rpx;
	}
	// end 日期选择对话框
	
	
	.subpage1 {
		height:calc(100vh - #{$headerHeight} - #{$storeHeaderHeight});
	}
	
	// begin 小卖部 by cmh
	.VerticalNav.nav {
		width: 200upx;
		white-space: initial;
		height:calc(100vh - #{$headerHeight} - #{$storeHeaderHeight});
		background-color: #f0f0f0;
	}

	.VerticalNav.nav .cu-item {
		width: 100%;
		text-align: center;
		background-color: #f0f0f0;
		margin: 0;
		border: none;
		height: 50px;
		position: relative;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	
	.VerticalNav.nav .cu-item.cur {
		background-color: #f7f7f7;
		//border-left: 4rpx solid #fc4141;
		//color: #fc4141;
		border-left: 4rpx solid var(--view-theme);
		color: var(--view-theme);
		width: 100%;
		text-align: center;
		font-weight: bold;
	}
	
	.VerticalMain {
		background-color: #f7f7f7;
		flex: 1;
		height:calc(100vh - #{$headerHeight} - #{$storeHeaderHeight});
	}


	.group-head {
		margin-top: 30rpx;
		// margin-bottom: 20rpx;
		padding-left: 20rpx;
		font-weight: bold;
		// border-bottom: 1px solid #eee;
	}
	
	// begin 添加商品&立即结算 by cmh
	.carnum {
		height: 47rpx;
	}
	.carnum view {
		border: 1px solid #a4a4a4;
		min-width: 66rpx;
		text-align: center;
		height: 100%;
		line-height: 46rpx;
		font-size: 28rpx;
		color: #a4a4a4;
	}
	.carnum .reduce {
		border-right: 0;
	}
	.carnum .reduce.on,
	.carnum .plus.on {
		border-color: #a4a4a4;
		color: #a4a4a4;
	}
	.carnum .plus {
		border-left: 0;
	}
	.carnum .num {
		color: #282828;
	}
	
	.cart-footer {
		z-index: 9;
		width: 100%;
		height: 96rpx;
		background-color: #fafafa;
		position: fixed;
		padding: 0 30rpx;
		box-sizing: border-box;
		border-top: 1px solid #eee;
		border-bottom: 1px solid #eee;
		/*#ifdef H5*/
		bottom: 98rpx;
		/*#endif*/
		/*#ifdef MP || APP-PLUS*/
		bottom: 0;
		/*#endif*/
	}
	.cart-footer.on {
		/*#ifdef MP || APP-PLUS*/
		bottom: 98rpx;
		bottom: calc(98rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
		bottom: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
		/*#endif*/
	}
	.cart-footer .money {
		font-size: 30rpx;
	}
	.cart-footer .placeOrder {
		color: #fff;
		font-size: 30rpx;
		width: 226rpx;
		height: 70rpx;
		border-radius: 50rpx;
		text-align: center;
		line-height: 70rpx;
		margin-left: 22rpx;
		background-color: var(--view-theme);
	}
	.cart-footer .button .bnt {
		font-size: 28rpx;
		color: #999;
		border-radius: 50rpx;
		border: 1px solid #999;
		width: 160rpx;
		height: 60rpx;
		text-align: center;
		line-height: 60rpx;
		&.bt-color {
			color: var(--view-theme);
			border: 1px solid var(--view-theme);
		}
	}
	.cart-footer .button form~form {
		margin-left: 17rpx;
	}
	// end 添加商品&立即结算 by cmh
	
	// end 小卖部 by cmh
	
	// begin 鱼讯 by cmh
	.fish-notify {
		height:calc(100vh - #{$headerHeight} - #{$navHeight}); // 对scss变量做calc计算不能直接使用$swiperHeight，要加#{}
		width: 750rpx;
	}
	// end 鱼讯 by cmh
</style>
